package cn.ft.eurekaserviceprovider;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class FirstController {
    @RequestMapping(value = "/person/{personId}")
    public Map<String, Object> findPerson(@PathVariable Integer personId) {
        HashMap<String, Object> map = new HashMap<>();
        map.put("id", personId);
        map.put("name", "张三");
        map.put("age", 18);
        return map;
    }
}